<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<#include "head.ftl" />
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});
function chkRow(i,b) {
	$("#right-table input[rgtrow="+i+"]").each(function(){
		$(this).attr("checked",b);
	});
}
function chkCol(i,b) {
	$("#right-table input[rgtcol="+i+"]").each(function(){
		$(this).attr("checked",b);
	});
}

var g_domain = "${st.domain}";
</script>
</head>
<body>
	<div class="body-box">
		<div class="rhead">
			<div class="rpos">当前位置: 店铺管理 - 添加店铺</div>
				<input type="button" value="返回列表"
					onclick="location.href='${st.domain}/store/list'" />
			<div class="clear"></div>
		</div>
		<form method="post" action="${st.domain}/store/addOrEditDo" id="jvForm">
			<table width="100%" class="pn-ftable" cellpadding="2" cellspacing="1"
				border="0">
				<tr>
					<td width="10%" class="pn-flabel pn-flabel-h"><span
						class="pn-frequired">*</span>地区:</td>
					<td colspan="1" class="pn-fcontent">
						<input type="hidden" id="regionId" name="region.regionId" value="${store.region.regionId}"/>
            			<span id="regions"></span>
					</td>
				</tr>
				<tr>
					<td width="10%" class="pn-flabel pn-flabel-h"><span
						class="pn-frequired">*</span>店铺名称:</td>
					<td colspan="1" class="pn-fcontent"><input
						type="text" value="${store.name}" name="name" class="required"
						size="25" maxlength="150" />
					</td>
				</tr>
				<tr>
					<td colspan="4" class="pn-fbutton">
						<input type="hidden" id="storeId" name="storeId" value="${store.storeId}"/>
						<input type="hidden" name="id" value="1" /> <input type="submit" value="提交" /> &nbsp; 
						<input type="reset" value="重置" />
					</td>
				</tr>
			</table>
		</form>
	</div>

</body>
<script src="${st.resDomain}/style/common/js/region.js" type="text/javascript"></script>
<script>
	
	// 加载地区并生成下拉列表
	$("#regions").regionsSelect($("#regionId").val(), function($select) {
		$("#regionId").val($select.val());
	});
	
	
	var curStoreId = $("#storeId").val();
	if(curStoreId){
		$(".rpos").html("当前位置: 店铺管理 - 修改店铺");
	} 
	
</script>
</html>